package com.foreknow.dao;

import com.foreknow.model.Gusetbook;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

/**
 * 接口
 * 在接口中要声明对Gusetbook Bean的操作
 */

public interface GuestbookDao {
    /**
     * 添加留言信息
     * @param gusetbook
     * @return
     * @throws SQLException
     */
    public boolean addMessage(Gusetbook gusetbook)throws SQLException;
    /**
        查询所有留言信息
     */
    public List<Object> getQueryAll()throws SQLException;
    /**
     * 删除信息
     */
    public boolean deleteById(Integer id)throws SQLException;
    /**
     * 根据id查到用户
     *
     */
    public Gusetbook queryById(Integer id)throws SQLException;
    /**
     * 根据id修改用户信息
     */
    public int updateById(int id, Gusetbook gusetbook, Connection conn)throws SQLException;
}
